package no.uio.ifi.cop.lex;

/**
 * Represents a piece of text, and its type.
 *
 * @version 1.0
 * @author  bjarneh@ifi.uio.no
 */

public class Token {

    public int ordinal, placement;
    public String content, id;

    protected Token(int ordinal, int placement, String content, String id){
        this.content   = content;
        this.ordinal   = ordinal;
        this.id        = id;
        this.placement = placement;
    }

    public String toString(){
        return String.format("Token[%s] %s", id, content);
    }
}
